package it.spredt.api;

import android.content.BroadcastReceiver;
import android.content.Intent;

/**
 * Constants for creating a spredt.
 * 
 * @author mbrehme
 * 
 */
public interface SpredtConstants {
	
	/** Attributename for: Action to push/put your spredt in the spredt.it plattform **/
	public static final String	INTENT_ACTION_PUSH								= "it.spredt.push";
	
	/** Attributename for: Title for the spredt **/
	public static final String	TITLE											= "it.spredt.title";
	/** Attributename for: Contentlabel for the spredt **/
	public static final String	CONTENT_LABEL									= "it.spredt.contentLabel";
	
	/** Attributename for: url for the icon displayed next to the spredt **/
	public static final String	IMAGE_URL										= "it.spredt.imageUrl";
	/** Attributename for: forces the use of the image_url **/
	public static final String	FORCE_IMAGE										= "it.spredt.forceImage";
	
	/** Attributename for: <b>is in the {@link Intent} you specify for an interaction</b> true if the intent is for an {@link BroadcastReceiver} **/
	public static final String	INTENT_EXTRA_IS_BROADCAST						= "it.spredt.isBroadcast";
	
	/** Attributename for: Interaction when user clicks on an spredt **/
	public static final String	ON_CLICK										= "it.spredt.onClick";
	/** Attributename for: Interaction when no application is installed for the spredt. **/
	public static final String	ON_NOT_INSTALLED								= "it.spredt.onNotInstalled";
	/** Attributename for: Interaction when an foreign user(not the spredt-owner) clicks on a spredt (<b> fired on the device of the spredt-owner</b>) **/
	public static final String	ON_FOREIGN_CLICK								= "it.spredt.onForeignClick";
	
	/** Url for finding spredt.it in the market **/
	public static final String	MARKET_URL										= "market://details?id=it.spredt.mobile";
	
	/** {@link Intent} {@link Intent#getExtras()} key for username if the user has confirmed {@link #INTENT_PERMISSION_USERNAME} **/
	public static final String	INTENT_EXTRA_USERNAME							= "it.spredt.username";
	/** {@link Intent} {@link Intent#getExtras()} key for uniqueUserId if the user has confirmed {@link #INTENT_PERMISSION_UNIQUE_USER_ID} **/
	public static final String	INTENT_EXTRA_UNIQUE_USER_ID						= "it.spredt.uniqueUserId";
	/** {@link Intent} {@link Intent#getExtras()} key for the messageToken if the user has confirmed {@link #INTENT_PERMISSION_INTER_SPREDT_COMMUNICATION} **/
	public static final String	INTENT_EXTRA_MESSAGE_TOKEN						= "it.spredt.messageToken";
	
	/** The user will be asked if he allows the starting intent to contain its username (can be empty) **/
	public static final String	INTENT_PERMISSION_USERNAME						= "it.spredt.permissionUsername";
	/** The user will be asked if he allows the starting intent to contain an unique ID for an user(is the same for each app but different on different apps) **/
	public static final String	INTENT_PERMISSION_UNIQUE_USER_ID				= "it.spredt.permissionUniqueUserId";
	/**
	 * The user will be asked if he allows the starting intent to comunicate with the conter-part of the spredt e.g.: Sending a message from FOREIGNER to OWNER or otherwise.<br/>
	 * <br/>
	 * <b>!!! WARNING !!!</b> - A {@link #INTENT_EXTRA_MESSAGE_TOKEN} generated with this permission is capable for sending only <b>ONE</b> message!
	 **/
	public static final String	INTENT_PERMISSION_INTER_SPREDT_COMMUNICATION	= "it.spredt.permissionInterSpredtCommunication";
	
	/** Permission is not required **/
	public static final int		PERMISSION_MODE_NONE							= 0;
	/** Permission is optional. If the user uncheck this the intent will be fired but doesn't contain the asked EXTRA **/
	public static final int		PERMISSION_MODE_OPTIONAL						= 1;
	/** Permission is mandatory. If the user uncheck this the intent wouldn't be fired **/
	public static final int		PERMISSION_MODE_MANDATORY						= 2;
	
}
